<template>
	<div>
		{{ name }}
		<div class="common-footer">
			<el-button class="lv1-blue" @click="update('点了确定')">确定</el-button>
			<el-button class="lv1-grey" @click="close">取消</el-button>
		</div>
	</div>
</template>

<script setup>
defineProps({
	name: String,
})
const emit = defineEmits(['close', 'update'])
const update = (params) => {
	// 通过@update传参出去。
	emit('update', `传参： ${params}`)
}
const close = () => {
	// emit('close') 可以主动关闭弹窗
	emit('close')
}
</script>

<style lang="scss" scoped>
</style>
